<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>发现人脉 - 社交圈</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome 图标 -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    
    <style>
        :root {
            --primary: #4f46e5;
            --primary-light: #818cf8;
            --primary-dark: #3730a3;
            --secondary: #ec4899;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --text-primary: #111827;
            --text-secondary: #6b7280;
            --bg-light: #f9fafb;
            --bg-white: #ffffff;
            --border-light: #e5e7eb;
            --radius: 12px;
            --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
            --shadow-hover: 0 4px 15px rgba(0, 0, 0, 0.1);
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background-color: var(--bg-light);
            color: var(--text-primary);
            padding-top: 56px;
            padding-bottom: 60px;
        }
        
        /* 顶部导航 */
        .top-nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 56px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 16px;
            z-index: 1000;
            border-bottom: 1px solid var(--border-light);
        }
        
        .nav-title {
            font-size: 1.1rem;
            font-weight: 600;
        }
        
        .nav-action {
            color: var(--text-secondary);
            background: none;
            border: none;
            font-size: 1.2rem;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .nav-action:hover {
            background-color: var(--bg-light);
        }
        
        /* 发现推荐标签 */
        .discovery-header {
            padding: 12px 16px;
            background-color: var(--bg-white);
            border-bottom: 1px solid var(--border-light);
        }
        
        .discovery-title {
            font-size: 0.9rem;
            color: var(--text-secondary);
            margin-bottom: 8px;
        }
        
        .recommendation-tags {
            display: flex;
            gap: 8px;
            overflow-x: auto;
            padding-bottom: 4px;
            scrollbar-width: none;
        }
        
        .recommendation-tags::-webkit-scrollbar {
            display: none;
        }
        
        .tag-item {
            padding: 6px 14px;
            background-color: var(--bg-light);
            border-radius: 20px;
            font-size: 0.85rem;
            white-space: nowrap;
            color: var(--text-primary);
            border: 1px solid var(--border-light);
        }
        
        .tag-item.active {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        /* 搜索栏 */
        .search-container {
            padding: 12px 16px;
            background-color: var(--bg-white);
            border-bottom: 1px solid var(--border-light);
        }
        
        .search-box {
            position: relative;
        }
        
        .search-input {
            width: 100%;
            padding: 10px 16px 10px 40px;
            border-radius: 30px;
            border: 1px solid var(--border-light);
            font-size: 0.9rem;
            background-color: var(--bg-light);
        }
        
        .search-input:focus {
            outline: none;
            border-color: var(--primary-light);
            box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
        }
        
        .search-icon {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-secondary);
            font-size: 0.95rem;
        }
        
        /* 筛选栏 */
        .filter-bar {
            display: flex;
            justify-content: space-between;
            padding: 8px 16px;
            background-color: var(--bg-white);
            border-bottom: 1px solid var(--border-light);
        }
        
        .filter-text {
            font-size: 0.9rem;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .filter-button {
            font-size: 0.9rem;
            color: var(--primary);
            background: none;
            border: none;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        /* 交友列表容器 */
        .friendship-container {
            padding: 12px 16px;
        }
        
        /* 列表标题 */
        .section-title {
            font-size: 1rem;
            font-weight: 600;
            margin: 16px 0 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .section-title .more {
            font-size: 0.85rem;
            font-weight: normal;
            color: var(--primary);
        }
        
        /* 交友卡片基础样式 */
        .friend-card {
            background-color: var(--bg-white);
            border-radius: var(--radius);
            padding: 16px;
            margin-bottom: 14px;
            box-shadow: var(--shadow);
            transition: all 0.2s ease;
            border: 1px solid var(--border-light);
        }
        
        .friend-card:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-hover);
        }
        
        .card-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 12px;
        }
        
        .person-info {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .person-avatar {
            width: 64px;
            height: 64px;
            border-radius: 50%;
            object-fit: cover;
            position: relative;
        }
        
        .avatar-status {
            position: absolute;
            bottom: 0;
            right: 0;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background-color: var(--bg-white);
            border: 2px solid var(--bg-white);
        }
        
        .status-online {
            background-color: var(--success);
        }
        
        .status-offline {
            background-color: var(--border-light);
        }
        
        .avatar-placeholder {
            width: 64px;
            height: 64px;
            border-radius: 50%;
            background-color: var(--bg-light);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            color: var(--text-secondary);
            border: 1px solid var(--border-light);
        }
        
        .person-details {
            min-width: 0;
        }
        
        .person-name {
            font-weight: 600;
            font-size: 1rem;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .name-badge {
            font-size: 0.7rem;
            padding: 1px 6px;
            border-radius: 10px;
            background-color: rgba(79, 70, 229, 0.1);
            color: var(--primary);
        }
        
        .person-meta {
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin-top: 3px;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        
        .connection-tag {
            font-size: 0.75rem;
            color: var(--secondary);
            background-color: rgba(236, 72, 153, 0.1);
            padding: 2px 8px;
            border-radius: 10px;
            display: inline-block;
            margin-top: 4px;
        }
        
        /* 卡片操作按钮 */
        .card-actions {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        
        .action-btn {
            padding: 6px 12px;
            border-radius: 8px;
            font-size: 0.85rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }
        
        .primary-btn {
            background-color: var(--primary);
            color: white;
            border: none;
        }
        
        .secondary-btn {
            background-color: var(--bg-light);
            color: var(--text-primary);
            border: 1px solid var(--border-light);
        }
        
        /* 内容区域 - 多图样式 */
        .media-content {
            margin: 12px 0;
        }
        
        .media-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
        }
        
        .media-item {
            aspect-ratio: 1;
            border-radius: 8px;
            overflow: hidden;
            position: relative;
        }
        
        .media-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .media-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.4);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.9rem;
        }
        
        /* 单图样式 */
        .single-media {
            border-radius: 8px;
            overflow: hidden;
            margin: 12px 0;
        }
        
        .single-image {
            width: 100%;
            height: 180px;
            object-fit: cover;
        }
        
        /* 个人简介 */
        .intro-text {
            font-size: 0.85rem;
            line-height: 1.5;
            color: var(--text-primary);
            margin: 10px 0;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        /* 共同兴趣/好友 */
        .common-info {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin: 8px 0;
        }
        
        .common-avatars {
            display: flex;
        }
        
        .common-avatar {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid var(--bg-white);
            margin-left: -8px;
        }
        
        .common-avatar:first-child {
            margin-left: 0;
        }
        
        /* 无图样式卡片 */
        .no-media .media-content,
        .no-media .single-media {
            display: none;
        }
        
        /* 简洁样式卡片 */
        .compact-card {
            padding: 12px 16px;
        }
        
        .compact-card .intro-text,
        .compact-card .common-info {
            display: none;
        }
        
        .compact-card .card-header {
            margin-bottom: 0;
        }
        
        /* 底部导航 */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 60px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-around;
            align-items: center;
            border-top: 1px solid var(--border-light);
            z-index: 1000;
        }
        
        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: var(--text-secondary);
            font-size: 0.7rem;
            gap: 4px;
            flex: 1;
            height: 100%;
        }
        
        .nav-item.active {
            color: var(--primary);
        }
        
        .nav-icon {
            font-size: 1.2rem;
        }
        
        /* 加载更多 */
        .load-more {
            padding: 15px 0;
            text-align: center;
            font-size: 0.9rem;
            color: var(--primary);
        }
        
        .loading {
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        
        .spinner {
            width: 16px;
            height: 16px;
            border: 2px solid rgba(79, 70, 229, 0.2);
            border-radius: 50%;
            border-top-color: var(--primary);
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        /* 提示消息 */
        .toast {
            position: fixed;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%);
            background-color: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 8px 16px;
            border-radius: 4px;
            z-index: 9999;
            font-size: 0.85rem;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .toast.show {
            opacity: 1;
        }
    </style>
</head>
<body>
    <!-- 顶部导航 -->
    <div class="top-nav">
        <button class="nav-action" id="backBtn">
            <i class="fas fa-arrow-left"></i>
        </button>
        <div class="nav-title">发现人脉</div>
        <button class="nav-action" id="settingsBtn">
            <i class="fas fa-cog"></i>
        </button>
    </div>
    
    <!-- 发现推荐标签 -->
    <div class="discovery-header">
        <div class="discovery-title">为你推荐</div>
        <div class="recommendation-tags">
            <div class="tag-item active">全部</div>
            <div class="tag-item">附近的人</div>
            <div class="tag-item">兴趣相投</div>
            <div class="tag-item">职场人脉</div>
            <div class="tag-item">新加入</div>
            <div class="tag-item">校友</div>
        </div>
    </div>
    
    <!-- 搜索栏 -->
    <div class="search-container">
        <div class="search-box">
            <i class="fas fa-search search-icon"></i>
            <input type="text" class="search-input" placeholder="搜索感兴趣的人...">
        </div>
    </div>
    
    <!-- 筛选栏 -->
    <div class="filter-bar">
        <div class="filter-text">
            <i class="fas fa-sliders-h"></i>
            <span>筛选</span>
        </div>
        <button class="filter-button">
            <span>最新加入</span>
            <i class="fas fa-chevron-down"></i>
        </button>
    </div>
    
    <!-- 交友列表容器 -->
    <div class="friendship-container">
        <!-- 可能认识的人 -->
        <div class="section-title">
            <span>可能认识的人</span>
            <span class="more">查看全部</span>
        </div>
        
        <!-- 1. 多图样式卡片 -->
        <div class="friend-card">
            <div class="card-header">
                <div class="person-info">
                    <div>
                        <img src="https://picsum.photos/id/64/200/200" alt="陈佳琪" class="person-avatar">
                        <div class="avatar-status status-online"></div>
                    </div>
                    <div class="person-details">
                        <div class="person-name">
                            陈佳琪 
                            <i class="fas fa-female" style="color: #ec4899; font-size: 0.8rem;"></i>
                            <span class="name-badge">设计师</span>
                        </div>
                        <div class="person-meta">
                            <span>27岁</span>
                            <span>上海</span>
                            <span>已认证</span>
                        </div>
                        <span class="connection-tag">12个共同好友</span>
                    </div>
                </div>
                <div class="card-actions">
                    <button class="action-btn primary-btn" id="addFriend1">
                        <i class="fas fa-user-plus"></i> 加好友
                    </button>
                </div>
            </div>
            
            <p class="intro-text">
                热爱生活的UI设计师，喜欢摄影和旅行，期待认识有趣的朋友一起探索城市美好。
            </p>
            
            <div class="common-info">
                <i class="fas fa-tag"></i>
                <span>共同兴趣：摄影、旅行、设计</span>
            </div>
            
            <div class="media-content">
                <div class="media-grid">
                    <div class="media-item">
                        <img src="https://picsum.photos/id/112/300/300" alt="照片1" class="media-image">
                    </div>
                    <div class="media-item">
                        <img src="https://picsum.photos/id/119/300/300" alt="照片2" class="media-image">
                    </div>
                    <div class="media-item">
                        <img src="https://picsum.photos/id/133/300/300" alt="照片3" class="media-image">
                        <div class="media-overlay">+4</div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 2. 单图样式卡片 -->
        <div class="friend-card">
            <div class="card-header">
                <div class="person-info">
                    <div>
                        <img src="https://picsum.photos/id/91/200/200" alt="李明" class="person-avatar">
                        <div class="avatar-status status-offline"></div>
                    </div>
                    <div class="person-details">
                        <div class="person-name">
                            李明 
                            <i class="fas fa-male" style="color: #3b82f6; font-size: 0.8rem;"></i>
                            <span class="name-badge">工程师</span>
                        </div>
                        <div class="person-meta">
                            <span>30岁</span>
                            <span>北京</span>
                            <span>已认证</span>
                        </div>
                        <span class="connection-tag">8个共同好友</span>
                    </div>
                </div>
                <div class="card-actions">
                    <button class="action-btn primary-btn" id="addFriend2">
                        <i class="fas fa-user-plus"></i> 加好友
                    </button>
                </div>
            </div>
            
            <p class="intro-text">
                后端开发工程师，喜欢技术分享和户外运动，周末常去爬山和参加技术沙龙。
            </p>
            
            <div class="common-info">
                <div class="common-avatars">
                    <img src="https://picsum.photos/id/64/100/100" alt="共同好友" class="common-avatar">
                    <img src="https://picsum.photos/id/65/100/100" alt="共同好友" class="common-avatar">
                    <img src="https://picsum.photos/id/54/100/100" alt="共同好友" class="common-avatar">
                </div>
                <span>等8人是你们的共同好友</span>
            </div>
            
            <div class="single-media">
                <img src="https://picsum.photos/id/431/600/300" alt="个人照片" class="single-image">
            </div>
        </div>
        
        <!-- 3. 无图样式卡片 -->
        <div class="friend-card no-media">
            <div class="card-header">
                <div class="person-info">
                    <div>
                        <img src="https://picsum.photos/id/65/200/200" alt="王芳" class="person-avatar">
                        <div class="avatar-status status-online"></div>
                    </div>
                    <div class="person-details">
                        <div class="person-name">
                            王芳 
                            <i class="fas fa-female" style="color: #ec4899; font-size: 0.8rem;"></i>
                            <span class="name-badge">教师</span>
                        </div>
                        <div class="person-meta">
                            <span>29岁</span>
                            <span>广州</span>
                            <span>已认证</span>
                        </div>
                        <span class="connection-tag">5个共同好友</span>
                    </div>
                </div>
                <div class="card-actions">
                    <button class="action-btn primary-btn" id="addFriend3">
                        <i class="fas fa-user-plus"></i> 加好友
                    </button>
                </div>
            </div>
            
            <p class="intro-text">
                大学语文教师，喜欢阅读和写作，偶尔会组织读书会，希望认识同样热爱文学的朋友。
            </p>
            
            <div class="common-info">
                <i class="fas fa-tag"></i>
                <span>共同兴趣：阅读、写作、电影</span>
            </div>
        </div>
        
        <!-- 职场人脉 -->
        <div class="section-title">
            <span>职场人脉</span>
            <span class="more">查看全部</span>
        </div>
        
        <!-- 4. 无头像样式卡片 -->
        <div class="friend-card no-media compact-card">
            <div class="card-header">
                <div class="person-info">
                    <div class="avatar-placeholder">
                        <i class="fas fa-user"></i>
                    </div>
                    <div class="person-details">
                        <div class="person-name">
                            张伟 
                            <i class="fas fa-male" style="color: #3b82f6; font-size: 0.8rem;"></i>
                            <span class="name-badge">产品经理</span>
                        </div>
                        <div class="person-meta">
                            <span>32岁</span>
                            <span>深圳</span>
                            <span>某科技公司</span>
                        </div>
                        <span class="connection-tag">同行业</span>
                    </div>
                </div>
                <div class="card-actions">
                    <button class="action-btn secondary-btn">
                        <i class="fas fa-envelope"></i> 发消息
                    </button>
                    <button class="action-btn primary-btn" id="addFriend4">
                        <i class="fas fa-user-plus"></i> 加好友
                    </button>
                </div>
            </div>
        </div>
        
        <!-- 5. 简洁多图样式卡片 -->
        <div class="friend-card">
            <div class="card-header">
                <div class="person-info">
                    <div>
                        <img src="https://picsum.photos/id/22/200/200" alt="刘强" class="person-avatar">
                        <div class="avatar-status status-online"></div>
                    </div>
                    <div class="person-details">
                        <div class="person-name">
                            刘强 
                            <i class="fas fa-male" style="color: #3b82f6; font-size: 0.8rem;"></i>
                            <span class="name-badge">创业者</span>
                        </div>
                        <div class="person-meta">
                            <span>35岁</span>
                            <span>杭州</span>
                            <span>已认证</span>
                        </div>
                        <span class="connection-tag">潜在合作伙伴</span>
                    </div>
                </div>
                <div class="card-actions">
                    <button class="action-btn primary-btn" id="addFriend5">
                        <i class="fas fa-user-plus"></i> 加好友
                    </button>
                </div>
            </div>
            
            <div class="media-content">
                <div class="media-grid">
                    <div class="media-item">
                        <img src="https://picsum.photos/id/180/300/300" alt="公司活动" class="media-image">
                    </div>
                    <div class="media-item">
                        <img src="https://picsum.photos/id/239/300/300" alt="演讲分享" class="media-image">
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 加载更多 -->
        <div class="load-more">
            <div class="loading">
                <div class="spinner"></div>
                <span>加载更多人脉</span>
            </div>
        </div>
    </div>
    
    <!-- 底部导航 -->
    <div class="bottom-nav">
        <div class="nav-item">
            <i class="fas fa-home nav-icon"></i>
            <span>首页</span>
        </div>
        <div class="nav-item active">
            <i class="fas fa-compass nav-icon"></i>
            <span>发现</span>
        </div>
        <div class="nav-item">
            <i class="fas fa-users nav-icon"></i>
            <span>人脉</span>
        </div>
        <div class="nav-item">
            <i class="fas fa-bell nav-icon"></i>
            <span>通知</span>
        </div>
        <div class="nav-item">
            <i class="fas fa-user nav-icon"></i>
            <span>我的</span>
        </div>
    </div>
    
    <!-- 提示消息元素 -->
    <div class="toast" id="toast"></div>
    
    <!-- Bootstrap JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        // 推荐标签切换
        document.querySelectorAll('.tag-item').forEach(tag => {
            tag.addEventListener('click', function() {
                document.querySelectorAll('.tag-item').forEach(t => t.classList.remove('active'));
                this.classList.add('active');
                showToast(`已切换到${this.textContent}`);
            });
        });
        
        // 搜索功能
        document.querySelector('.search-input').addEventListener('keypress', function(e) {
            if (e.key === 'Enter') {
                const searchText = this.value.trim();
                if (searchText) {
                    showToast(`搜索: ${searchText}`);
                }
            }
        });
        
        // 加好友按钮
        document.querySelectorAll('[id^="addFriend"]').forEach(btn => {
            btn.addEventListener('click', function() {
                const userName = this.closest('.friend-card').querySelector('.person-name').textContent.trim().split(' ')[0];
                
                // 更改按钮状态
                this.innerHTML = '<i class="fas fa-check"></i> 已发送';
                this.disabled = true;
                this.style.backgroundColor = var(--success);
                
                showToast(`好友请求已发送给 ${userName}`);
            });
        });
        
        // 筛选按钮
        document.querySelector('.filter-text').addEventListener('click', function() {
            showToast('筛选功能');
        });
        
        document.querySelector('.filter-button').addEventListener('click', function() {
            showToast('排序方式已切换');
        });
        
        // 查看更多
        document.querySelectorAll('.section-title .more').forEach(item => {
            item.addEventListener('click', function() {
                const section = this.parentElement.querySelector('span:first-child').textContent;
                showToast(`查看全部${section}`);
            });
        });
        
        // 底部导航切换
        document.querySelectorAll('.nav-item').forEach(item => {
            item.addEventListener('click', function() {
                document.querySelectorAll('.nav-item').forEach(i => i.classList.remove('active'));
                this.classList.add('active');
            });
        });
        
        // 图片点击查看
        document.querySelectorAll('.media-image, .single-image').forEach(img => {
            img.addEventListener('click', function() {
                showToast('查看图片详情');
            });
        });
        
        // 返回按钮
        document.getElementById('backBtn').addEventListener('click', function() {
            history.back();
        });
        
        // 设置按钮
        document.getElementById('settingsBtn').addEventListener('click', function() {
            showToast('打开设置');
        });
        
        // 提示消息功能
        function showToast(message) {
            const toast = document.getElementById('toast');
            toast.textContent = message;
            toast.classList.add('show');
            
            setTimeout(() => {
                toast.classList.remove('show');
            }, 2000);
        }
    </script>
</body>
</html>

